﻿{eq name="row" value=""}
<title>{$webTitle}</title>
<style>#qrimg > img {
    width: 6rem;
    height: 6rem;
}</style>  
<div class="app-header t-v bg-bai dl2 bb b-hui"><span class="header-l t-v nowrap" onclick="x.mclose();"><i class="icon icon-pleft f9"></i>返回</span> <span class="header-c t-v t-c nowrap">{$webTitle}</span> <span class="header-r t-v t-r nowrap" onclick="mode_qq_add('qqlist','');"><i class="icon icon-more f10"></i></span>
</div>
<div class="app-content  bg-bai">
    <div class="p3">
        <div class="qrimgid t-c">
            <div class="f6 bold hong">请使用手机QQ扫描二维码</div>
            <hr class="mt2"/>
            <div class="pt1 h63" id="qrimg"><p class="pt12 hui">二维码加载中</p></div>
            <div class="pt4 pb4 bold"><span class="pr3">登陆地点</span> 
			{if condition="config('sys_is_qqlogin_api_check_1') eq 1"}
			<label class="i-checks ml4"><input type="radio" name="area" value="1"  onclick="_sm_cutover_area();" checked=""><i></i>{:config('sys_is_qqlogin_api_dz_1')}</label>
			{/if}
			{if condition="config('sys_is_qqlogin_api_check_2') eq 1"}
				<label class="i-checks ml4"><input type="radio" name="area" onclick="_sm_cutover_area();" value="2"><i></i>{:config('sys_is_qqlogin_api_dz_2')}</label>
			{/if}
			{if condition="config('sys_is_qqlogin_api_check_3') eq 1"}
				<label class="i-checks ml4"><input type="radio" name="area" onclick="_sm_cutover_area();" value="3"><i></i>{:config('sys_is_qqlogin_api_dz_3')}</label>
			{/if}
			{if condition="config('sys_is_qqlogin_api_check_4') eq 1"}
				<label class="i-checks ml4"><input type="radio" name="area" onclick="_sm_cutover_area();" value="4"><i></i>{:config('sys_is_qqlogin_api_dz_4')}</label>
			{/if}
            </div>
            <hr>
        </div>
        <div class="pt3 pb3 bold lv t-c" id="smlogin"><span id="loginmsg"></span> <span id="loginload" class="pl1"><i
                class="mode-loading cheng w3 h3 v-4"></i></span></div>
        <div class="in-list in-t top pt1 mb3 f2 hui smtutorial"><p class="bold f4 mb2">手机扫码教程：</p>
            <dl>
                <dt>1、</dt>
                <dd>长按二维码保存图片到手机，或者使用手机截图功能截图本页面。</dd>
            </dl>
            <dl>
                <dt>2、</dt>
                <dd>在手机QQ扫一扫界面，点右上角进入相册，选择刚才保存的二维码图片即可识别。</dd>
            </dl>
        </div>
    </div>
</div>
<script type="text/javascript">
	function _sm_qrpic() {
        var area = $('input[name="area"]:checked').val();
        sm.qrpic('{:url('mobile_ajax/qq',['act'=>'saoma'])}?is=get&area=' + area, '');
    }

    function _sm_qrlogin() {
        var area = $('input[name="area"]:checked').val();
        saomaInterID = setInterval(function () {
            sm.qrlogin('{:url('mobile_ajax/qq',['act'=>'saoma'])}?stem=qqlist&area=' + area, '');
        }, 3000);
    }

    function _sm_success() {
        if ($("#loginload").length > 0) {
            $(".qrimgid").hide();
            $("#loginload").remove();
            $(".smtutorial").remove();
            $("#qrcodeimg").remove();
            $("#loginmsg").html("<p class='mt9'><i class='icon icon-check f16 lv'></i></p><p class='qing mt5 pb9'>扫码成功，请在手机上确认授权登陆&nbsp; <i class='mode-loading qing w3 h3 v-4'></i></p>");
        }
    }


    function _sm_cutover_area() {
        $("#qrimg").html("<p class='pt12 hui'>二维码加载中</p>");
        sm.cleartime();
        _sm_qrpic();
		_sm_qrlogin();
    }

    $(function () {
        sm.cleartime();
        _sm_qrpic();
		_sm_qrlogin();
    });

</script>
{else/}
<style>#qrimg > img {
    width: 6rem;
    height: 6rem;
}</style> <title>扫码更新QQ - 我爱云任务</title>
<div class="app-header t-v bg-bai dl2 bb b-hui"><span class="header-l t-v nowrap" onclick="x.mclose();"><i
        class="icon icon-pleft f9"></i>返回</span> <span class="header-c t-v t-c nowrap">扫码更新QQ</span> <span
        class="header-r t-v t-r nowrap" onclick="mode_qq_add('qqset','{$row['qid']}');"><i
        class="icon icon-more f10"></i></span>
</div>
<div class="app-content mode-b5 bg-bai">
    <div class="p3">
        <div class="qrimgid t-c">
            <div class="f6 bold hong">请使用手机QQ扫描二维码</div>
            <div class="mt1 f2 hui">需要在手机QQ登陆c后扫码，登陆其他QQ时扫码无效</div>
            <hr class="mt2"/>
            <div class="pt1 h63" id="qrimg"><p class="pt12 hui">二维码加载中</p></div>
            <hr/>
        </div>
        <div class="pt3 pb3 bold lv t-c" id="smlogin"><span id="loginmsg"></span> <span id="loginload" class="pl1"><i
                class="mode-loading cheng w3 h3 v-4"></i></span></div>
        <label class="i-checks ml4" style="display: none"><input type="radio" name="area" value="{$row['area']}"  checked=""><i></i>{:config('sys_is_qqlogin_api_dz_'.$row['area'].'')}</label>
        <div class="in-list in-t top pt1 mb3 f2 hui smtutorial"><p class="bold f4 mb2">手机扫码教程：</p>
            <dl>
                <dt>1、</dt>
                <dd>长按二维码保存图片到手机，或者使用手机截图功能截图本页面。</dd>
            </dl>
            <dl>
                <dt>2、</dt>
                <dd>在手机QQ扫一扫界面，点右上角进入相册，选择刚才保存的二维码图片即可识别。</dd>
            </dl>
        </div>
    </div>
</div>
<div class="mode-footer w h5 bg-bai dl2 t-v bt">
    <div class="w f2 t-c hui">当前QQ使用 <font class="lv"><i class="icon icon-location"></i> {:config('sys_is_qqlogin_api_dz_'.$row['area'].'')}服务器</font>
        进行登陆，如需更改，请删除重新添加
    </div>
</div>
<script type="text/javascript">
	function _sm_qrpic() {
        var area = $('input[name="area"]:checked').val();
        sm.qrpic('{:url('mobile_ajax/qq',['act'=>'saoma'])}?is=get&area=' + area, '');
    }

    function _sm_qrlogin() {
        var area = $('input[name="area"]:checked').val();
        saomaInterID = setInterval(function () {
            sm.qrlogin('{:url('mobile_ajax/qq',['act'=>'saoma'])}?stem=qqlist&area=' + area, '');
        }, 3000);
    }

    function _sm_success() {
        if ($("#loginload").length > 0) {
            $(".qrimgid").hide();
            $("#loginload").remove();
            $(".smtutorial").remove();
            $("#qrcodeimg").remove();
            $("#loginmsg").html("<p class='mt9'><i class='icon icon-check f16 lv'></i></p><p class='qing mt5 pb9'>扫码成功，请在手机上确认授权登陆&nbsp; <i class='mode-loading qing w3 h3 v-4'></i></p>");
        }
    }


    function _sm_cutover_area() {
        $("#qrimg").html("<p class='pt12 hui'>二维码加载中</p>");
        sm.cleartime();
        _sm_qrpic();
		_sm_qrlogin();
    }

    $(function () {
        sm.cleartime();
        _sm_qrpic();
		_sm_qrlogin();
    });

</script>
{/eq}